<template>
  <!-- 通用markdown -->
  <div class="container">
    <van-empty v-if="isEmpty" description="暂无内容" />
    <markdown v-else :content="report" class="mark-down" />
  </div>
</template>

<script>
import markdown from "@/components/markdown.vue";
export default {
  name: "CounsellingCommon",
  components: { markdown },
  props: {
    report: {
      type: String,
      defaultValue: ""
    }
  },
  computed: {
    isEmpty() {
      return this.report?.length === 0 || this.report === null;
    }
  }
};
</script>

<style lang="less" scoped>
.container {
  padding: 12px 24px;
}

.mark-down {
  background: #f9fafc;
  border-radius: 8px;
  padding: 15px;
}

:deep h1 {
  font-weight: 600;
  font-size: 16px;
  color: #333333;
  line-height: 24px;
}

:deep h2 {
  font-weight: 600;
  font-size: 16px;
  color: #333333;
  line-height: 24px;
}

:deep h3 {
  font-weight: 600;
  font-size: 15px;
  color: #333333;
  line-height: 24px;
}
</style>
